package com.zzl.bonds.ticket.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zzl.bonds.ticket.dto.credit.CoreEnterpriseCreditPage;
import com.zzl.bonds.ticket.dto.credit.StatisticCreditDataDto;
import com.zzl.bonds.ticket.entity.CoreEnterpriseCreditEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 核心企业授信表
 * 
 * @author sunpp
 * @email 1171813232@qq.com
 * @date 2022-02-16 11:14:07
 */
@Mapper
@SuppressWarnings("javadoc")
public interface CoreEnterpriseCreditDao extends BaseMapper<CoreEnterpriseCreditEntity> {

    /**
    * 查询包含逻辑删除的数据集合
    * @param coreEnterpriseCreditEntity 核心企业授信表对象
    * @return 包含逻辑删除的数据集合
    */
    List<CoreEnterpriseCreditEntity> listIncludeDel(CoreEnterpriseCreditEntity coreEnterpriseCreditEntity);

    /**
     * 分页查询 核心企业的 授信额度
     *
     * @param page   分页返回值
     * @param params 分页参数
     * @return
     */
    IPage<CoreEnterpriseCreditPage> queryCoreEnterpriseCreditPage(IPage<CoreEnterpriseCreditPage> page, @Param("params") Map<String, Object> params);

    /**
     * 统计三个数量
     *
     * @param enterpriseId 企业id
     * @return 统计数据
     */
    StatisticCreditDataDto getThreeData(@Param("enterpriseId") String enterpriseId);

}
